< previous page page_264 next page >

Page 264
Chapter Objectives
Create a form that adds, edits, and deletes data from a table
Validate data
Retrieve a count of the number of records
Add your own record movement command buttons
Sample Project File: \Chapter13\DCProgramming.vbp
The Recordset Property
When a form loads that has a data control on it, the data control will use the properties that have been set, such as the Connection and RecordSource properties, to attempt to open a recordset before the Form_Load event. If everything is set correctly, a recordset is created and a reference to that recordset is contained in the Recordset property of the data control. The Recordset property can only be set and read at runtime.
Properties of the Recordset Object
Because the recordset is an object, it has properties and methods just like a text box control or a data control, which are also objects. Table 13.1 is a list of the most commonly used properties of the Recordset object.
Table 13.1 Properties of the Recordset Object.
PropertyDescription
BOFReturns True if the cursor is positioned before the first record in the recordset.
BookmarkReturns a value that marks or sets a position in the recordset. This is similar to the primary key of the tableits a unique value. You can use this value to hold the location of a particular record, move to other records, and then return to the record you marked.
EditModeReturns a value that indicates whether the user is adding, editing, or just browsing the data in a recordset.
EOFReturns True if the Cursor is positioned after the last record in the recordset.

(table continued on next page)

 
< previous page page_264 next page >

If you like this book, buy it!